/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package serviceLayer;

/**
 *
 * @author degrave
 */
public class ActionInvoker {
    
     private static ActionInvoker _instance = null;
    
     private IAction currentAction; 

    private ActionInvoker() {}

    public static synchronized ActionInvoker getInstance() {
        if (_instance == null)
            _instance = new ActionInvoker();
        return _instance;
    }
    

    public void setAction(IAction action){
        
        this.currentAction = action;
        
    }
    
   public void executeAction(){
       
       currentAction.execute();
       
   } 
    
    
}